<#include "../common/header.html">

<body class="skin-blue fixed sidebar-mini" style="height: auto; min-height: 100%;">
<div class="wrapper" style="height: auto; min-height: 100%;">
    <#assign page_tab="goods">
    <#include "goods_menu.html">

    <!--右侧内容 开始-->
    <div id="admin_right" class="content-wrapper">
        <div class="breadcrumbs" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="home-icon fa fa-home"></i>
                    <a href="#">系统</a>
                </li>
                <li>
                    <a href="#">商品管理</a>
                </li>
                <li class="active">商品编辑</li>
            </ul>
        </div>

        <div class="content">
            <form action="/goods/goods_update" name="goodsForm" method="post" novalidate="true">
                <input type="hidden" name="id" value="" />
                <input type='hidden' name="img" value="" />
                <input type='hidden' name="_imgList" value="" />
                <input type='hidden' name="callback" value="http://shop.aircheng.com/goods/goods_list" />

                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab1" data-toggle="tab">商品信息</a></li>
                        <li><a href="#tab2" data-toggle="tab">描述</a></li>
                        <li><a href="#tab3" data-toggle="tab">营销选项</a></li>
                    </ul>

                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">
                            <table class="table form-table">
                                <colgroup>
                                    <col width="130px" />
                                    <col />
                                </colgroup>

                                <tr>
                                    <th>商品名称：</th>
                                    <td>
                                        <input class="form-control" name="name" type="text" value="" pattern="required" />
                                    </td>
                                </tr>
                                <tr>
                                    <th>关键词：</th>
                                    <td>
                                        <input type='text' class='form-control' name='search_words' value='' />
                                        <p class="help-block">每个关键词最长为15个字符，必须以","(逗号)分隔符</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th>所属商户：</th>
                                    <td>
                                        <select class="form-control" name="seller_id">
                                            <option value="0">商城平台自营 </option>
                                            <option value="1">北京国贸大厦科技公司-admin</option>
                                            <option value="13">华源厨具-步行者</option>
                                            <option value="14">a驾校-ares111</option>
                                        </select>
                                        <p class="help-block"><a href='/member/seller_edit'>请点击添加商户</a></p>
                                    </td>
                                </tr>
                                <tr>
                                    <th>所属分类：</th>
                                    <td>
                                        <div id="__categoryBox" style="margin-bottom:8px"></div>
                                        <button class="btn btn-primary" type="button" name="_goodsCategoryButton"><i class="fa fa-list"></i> 设置分类</button>
                                        <script src="/public/javascript/public.js"></script>
                                        <script src="/plugins/_goodsCategoryWidget/goodsCategoryWidget.js"></script>
                                        <script type="text/javascript" charset="UTF-8" src="/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script><script>
                                        jQuery(function()
                                        {
                                            _goodsCategoryWidget = new categoryWidget({"type":"checkbox","name":"_goods_category[]","value":"","table":"category","categoryData":[{"id":"1","name":"家用电器","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"2","name":"大家电","parent_id":"1","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"3","name":"平板电视","parent_id":"2","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"4","name":"食品饮料","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"5","name":"进口食品","parent_id":"4","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"6","name":"牛奶","parent_id":"5","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"7","name":"家具","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"8","name":"家装建材","parent_id":"7","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"9","name":"灯饰照明","parent_id":"8","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"10","name":"服装","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"11","name":"男装","parent_id":"10","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"12","name":"衬衫","parent_id":"11","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"13","name":"生活电器","parent_id":"1","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"14","name":"厨房电器","parent_id":"1","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"15","name":"电风扇","parent_id":"13","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"16","name":"冷风扇","parent_id":"13","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"17","name":"扫地机器人","parent_id":"13","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"18","name":"电饭煲","parent_id":"14","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"19","name":"微波炉","parent_id":"14","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"20","name":"女包","parent_id":"10","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"21","name":"女装","parent_id":"10","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"31","name":"卧室家具","parent_id":"7","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"32","name":"实木床","parent_id":"31","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"33","name":"酒品","parent_id":"4","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"34","name":"红酒和白酒","parent_id":"33","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"35","name":"母婴用品","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"36","name":"尿不湿","parent_id":"35","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"37","name":"奶粉","parent_id":"35","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"38","name":"玩具","parent_id":"35","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"39","name":"汽车道具","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"40","name":"保险","parent_id":"39","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"41","name":"装饰","parent_id":"39","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"42","name":"配件","parent_id":"39","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"43","name":"美体护肤","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"44","name":"特仑苏","parent_id":"6","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"},{"id":"45","name":"是的","parent_id":"44","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"},{"id":"46","name":"哦哦","parent_id":"45","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"},{"id":"47","name":"以","parent_id":"46","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"}],"categoryParentData":{"0":[{"id":"1","name":"家用电器","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"4","name":"食品饮料","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"7","name":"家具","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"10","name":"服装","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"35","name":"母婴用品","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"39","name":"汽车道具","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"43","name":"美体护肤","parent_id":"0","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"1":[{"id":"2","name":"大家电","parent_id":"1","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"13","name":"生活电器","parent_id":"1","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"14","name":"厨房电器","parent_id":"1","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"2":[{"id":"3","name":"平板电视","parent_id":"2","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"4":[{"id":"5","name":"进口食品","parent_id":"4","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"33","name":"酒品","parent_id":"4","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"5":[{"id":"6","name":"牛奶","parent_id":"5","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"7":[{"id":"8","name":"家装建材","parent_id":"7","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"31","name":"卧室家具","parent_id":"7","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"8":[{"id":"9","name":"灯饰照明","parent_id":"8","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"10":[{"id":"11","name":"男装","parent_id":"10","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"20","name":"女包","parent_id":"10","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"21","name":"女装","parent_id":"10","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"11":[{"id":"12","name":"衬衫","parent_id":"11","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"13":[{"id":"15","name":"电风扇","parent_id":"13","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"16","name":"冷风扇","parent_id":"13","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"17","name":"扫地机器人","parent_id":"13","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"14":[{"id":"18","name":"电饭煲","parent_id":"14","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"19","name":"微波炉","parent_id":"14","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"31":[{"id":"32","name":"实木床","parent_id":"31","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"33":[{"id":"34","name":"红酒和白酒","parent_id":"33","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"35":[{"id":"36","name":"尿不湿","parent_id":"35","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"37","name":"奶粉","parent_id":"35","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"38","name":"玩具","parent_id":"35","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"39":[{"id":"40","name":"保险","parent_id":"39","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"41","name":"装饰","parent_id":"39","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"},{"id":"42","name":"配件","parent_id":"39","sort":"0","visibility":"1","keywords":null,"descript":null,"title":null,"seller_id":"0"}],"6":[{"id":"44","name":"特仑苏","parent_id":"6","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"}],"44":[{"id":"45","name":"是的","parent_id":"44","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"}],"45":[{"id":"46","name":"哦哦","parent_id":"45","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"}],"46":[{"id":"47","name":"以","parent_id":"46","sort":"0","visibility":"1","keywords":"","descript":"","title":"","seller_id":"0"}]}});
                                        });
                                    </script>							<a href='/goods/category_edit'>添加新分类</a>
                                    </td>
                                </tr>
                                <tr>
                                    <th>是否上架：</th>
                                    <td>
                                        <label class="radio-inline">
                                            <input type="radio" name="is_del" value="0" checked >是
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="is_del" value="2">否
                                        </label>
                                        <p class="help-block">只有上架的商品才会在前台显示出来，客户是无法看到下架商品</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th>是否共享：</th>
                                    <td>
                                        <label class="radio-inline">
                                            <input type="radio" name="is_share" value="1">是
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="is_share" value="0" checked>否
                                        </label>
                                        <p class="help-block">商城平台的商品可以被商家复制共享</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th>是否免运费：</th>
                                    <td>
                                        <label class="radio-inline">
                                            <input type="radio" name="is_delivery_fee" value="1">是
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="is_delivery_fee" value="0" checked>否
                                        </label>
                                        <p class="help-block">是否免运费</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th>附属数据：</th>
                                    <td>
                                        <table class="table no-padding">
                                            <thead>
                                            <tr>
                                                <td>购买成功增加积分</td><td>排序</td><td>计件单位显示</td><td>购买成功增加经验值</td>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr>
                                                <td><input class="form-control w-auto" name="point" type="text" pattern="int" value="0"/></td>
                                                <td><input class="form-control w-auto" name="sort" type="text" pattern="int" value="99"/></td>
                                                <td><input class="form-control w-auto" name="unit" type="text" value="件"/></td>
                                                <td><input class="form-control w-auto" name="exp" type="text" pattern="int" value="0"/></td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <th>基本数据：</th>
                                    <td>
                                        <div class="table-responsive" id="productBox">
                                            <table class="table">
                                                <thead id="goodsBaseHead"></thead>

                                                <!--商品标题模板-->
                                                <script id="goodsHeadTemplate" type='text/html'>
                                                    <tr>
                                                        <td>商品货号</td>
                                                        <%var isProduct = false;%>
                                                        <%for(var item in templateData){%>
                                                        <%isProduct = true;%>
                                                        <td><a href="javascript:confirm('确定要删除此列规格？','delSpec(<%=templateData[item]['id']%>)');"><%=templateData[item]['name']%></a></td>
                                                        <%}%>
                                                        <td>库存</td>
                                                        <td>市场价格</td>
                                                        <td>销售价格</td>
                                                        <td>成本价格</td>
                                                        <td>重量(克)</td>
                                                        <%if(isProduct == true){%>
                                                        <td>操作</td>
                                                        <%}%>
                                                    </tr>
                                                </script>

                                                <tbody id="goodsBaseBody"></tbody>

                                                <!--商品内容模板-->
                                                <script id="goodsRowTemplate" type="text/html">
                                                    <%var i=0;%>
                                                    <%for(var item in templateData){%>
                                                    <%item = templateData[item]%>
                                                    <tr>
                                                        <td><input class="form-control input-sm" name="_goods_no[<%=i%>]" pattern="required" type="text" value="<%=item['goods_no'] ? item['goods_no'] : item['products_no']%>" style="width:120px" /></td>
                                                        <%var isProduct = false;%>
                                                        <%var specArrayList = typeof item['spec_array'] == 'string' && item['spec_array'] ? JSON().parse(item['spec_array']) : item['spec_array'];%>
                                                        <%for(var result in specArrayList){%>
                                                        <%result = specArrayList[result]%>
                                                        <input type='hidden' name="_spec_array[<%=i%>][]" value='<%=JSON().stringify(result)%>' />
                                                        <%isProduct = true;%>
                                                        <td>
                                                            <%if(result['type'] == 1){%>
                                                            <%=result['value']%>
                                                            <%}else{%>
                                                            <img class="img-thumbnail" width="30px" height="30px" src="<%=webroot(result['value'])%>">
                                                            <%}%>
                                                        </td>
                                                        <%}%>
                                                        <td><input class="form-control input-sm" name="_store_nums[<%=i%>]" type="text" pattern="int" value="<%=item['store_nums']?item['store_nums']:100%>" style="width:70px" /></td>
                                                        <td><input class="form-control input-sm" name="_market_price[<%=i%>]" type="text" pattern="float" value="<%=item['market_price']%>" style="width:70px" /></td>
                                                        <td>
                                                            <input type='hidden' name="_groupPrice[<%=i%>]" value="<%=item['groupPrice']%>" />
                                                            <input class="form-control input-sm" name="_sell_price[<%=i%>]" type="text" pattern="float" value="<%=item['sell_price']%>" style="width:70px;display:inline;" />
                                                            <button class="btn btn-sm <%if(item['groupPrice']){%>btn-success<%}else{%>btn-default<%}%>" type="button" onclick="memberPrice(this);"><i class="fa fa-user"></i> 会员价格</button>
                                                        </td>
                                                        <td><input class="form-control input-sm" name="_cost_price[<%=i%>]" type="text" pattern="float" empty value="<%=item['cost_price']%>" style="width:70px" /></td>
                                                        <td><input class="form-control input-sm" name="_weight[<%=i%>]" type="text" pattern="float" empty value="<%=item['weight']%>" style="width:70px" /></td>
                                                        <%if(isProduct == true){%>
                                                        <td><a onclick="delProduct(this);"><i class='operator fa fa-close'></i></td>
                                                        <%}%>
                                                    </tr>
                                                    <%i++;%>
                                                    <%}%>
                                                </script>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <th>商品模型：</th>
                                    <td>
                                        <select class="form-control " name="model_id" onchange="create_attr(this.value)">
                                            <option value="0">通用类型 </option>
                                            <option value="1">服装</option>
                                            <option value="7">3C产品</option>
                                            <option value="26">手机</option>
                                            <option value="34">服装</option>
                                            <option value="60">服装上衣</option>
                                            <option value="97">小米手机模型</option>
                                            <option value="102">杯子</option>
                                        </select>
                                        <p class="help-block">可以加入商品扩展属性，比如：型号，年代，款式...</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th>规格：</th>
                                    <td>
                                        <div class="row">
                                            <div class="col-xs-3">
                                                <select class='form-control' onchange='selSpecVal(this);' id='specNameSel'>
                                                    <option value=''>选规格名称</option>
                                                    <option value='618'>体积</option>
                                                    <option value='619'>1</option>
                                                    <option value='620'>22222</option>
                                                </select>
                                            </div>

                                            <div class="col-xs-3">
                                                <select class='form-control' onchange='selSpec(this);' id='specValSel'>
                                                    <option value='0'>选规格数据</option>
                                                </select>
                                            </div>

                                            <div class="col-xs-2">
                                                <button class="btn btn-default" onclick="addNewSpec(0);" type="button">新建规格</button>
                                            </div>
                                        </div>
                                        <p class="help-block">可从现有规格中选择或新建规格生成货品。比如：尺码，颜色，类型...</p>
                                    </td>
                                </tr>
                                <tr id="properties" style="display:none">
                                    <th>扩展属性：</th>
                                    <td>
                                        <table class="table table-bordered" id="propert_table">
                                            <script type='text/html' id='propertiesTemplate'>
                                                <tbody>
                                                <%for(var item in templateData){%>
                                                <%item = templateData[item]%>
                                                <%var valueItems = item['value'].split(',');%>
                                                <tr>
                                                    <td><%=item["name"]%></td>
                                                    <td>
                                                        <%if(item['type'] == 1){%>
                                                        <%for(var tempVal in valueItems){%>
                                                        <%tempVal = valueItems[tempVal]%>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="attr_id_<%=item['id']%>" value="<%=tempVal%>" ><%=tempVal%>
                                                        </label>
                                                        <%}%>
                                                        <%}else if(item['type'] == 2){%>
                                                        <%for(var tempVal in valueItems){%>
                                                        <%tempVal = valueItems[tempVal]%>
                                                        <label class="checkbox-inline">
                                                            <input type="checkbox" name="attr_id_<%=item['id']%>[]" value="<%=tempVal%>" >><%=tempVal%>
                                                        </label>
                                                        <%}%>
                                                        <%}else if(item['type'] == 3){%>
                                                        <select class="form-control" name="attr_id_<%=item['id']%>">
                                                            <%for(var tempVal in valueItems){%>
                                                            <%tempVal = valueItems[tempVal]%>
                                                            <option value="<%=tempVal%>"><%=tempVal%></option>
                                                            <%}%>
                                                        </select>
                                                        <%}else if(item['type'] == 4){%>
                                                        <input type="text" name="attr_id_<%=item['id']%>" value="<%=item['value']%>" class="form-control" />
                                                        <%}%>
                                                    </td>
                                                </tr>
                                                <%}%>
                                            </script>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <th>商品推荐：</th>
                                    <td>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name='_goods_commend[]' value="1">最新商品
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name='_goods_commend[]' value="2">特价商品
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name='_goods_commend[]' value="3">热卖商品
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name='_goods_commend[]' value="4">推荐商品
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <th>商品品牌：</th>
                                    <td>
                                        <select class="form-control" name="brand_id">
                                            <option value="0">请选择</option>
                                            <option value="1">哥弟</option>
                                            <option value="2">adidas</option>
                                            <option value="3">阿迪达斯</option>
                                            <option value="4">翔龙</option>
                                            <option value="5">美特斯匡威</option>
                                            <option value="6">匡威</option>
                                            <option value="7">美特斯邦威</option>
                                            <option value="8">邦威</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <th>产品相册：</th>
                                    <td>
                                        <input id="fileUpload" type="file" accept="image/png,image/gif,image/jpeg" name="_goodsFile" multiple="multiple" data-url="/goods/goods_img_upload" />
                                        <p class="help-block" id="uploadPercent">可以上传多张图片，分辨率3000px以下，大小不得超过50M</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td id="thumbnails"></td>

                                    <!--图片模板-->
                                    <script type='text/html' id='picTemplate'>
                                        <div class='pic pull-left'>
                                            <img name="picThumb" onclick="defaultImage(this);" class="img-thumbnail" style="width:100px;height:100px" src="<%=webroot(picRoot)%>" alt="<%=picRoot%>" />
                                            <p class="text-center">
                                                <a href='javascript:;' onclick="$(this).parents('.pic').insertBefore($(this).parents('.pic').prev());"><i class="operator fa fa-backward" title="左移动"></i></a>
                                                <a href='javascript:;' onclick="$(this).parents('.pic').remove();"><i class="operator fa fa-close" title="删除"></i></a>
                                                <a href='javascript:;' onclick="$(this).parents('.pic').insertAfter($(this).parents('.pic').next());"><i class="operator fa fa-forward" title="右移动"></i></a>
                                            </p>
                                        </div>
                                    </script>
                                </tr>
                            </table>
                        </div>

                        <div class="tab-pane" id="tab2">
                            <table class="table form-table">
                                <colgroup>
                                    <col width="130px" />
                                    <col />
                                </colgroup>
                                <tr>
                                    <th>产品描述：</th>
                                    <td><textarea id="content" name="content" style="width:100%;height:400px;"></textarea></td>
                                </tr>
                            </table>
                        </div>

                        <div class="tab-pane" id="tab3">
                            <table class="table form-table">
                                <colgroup>
                                    <col width="130px" />
                                    <col />
                                </colgroup>

                                <tr>
                                    <th>SEO关键词：</th><td><input class="form-control" name="keywords" type="text" value="" /></td>
                                </tr>
                                <tr>
                                    <th>SEO描述：</th><td><textarea class="form-control" name="description"></textarea></td>
                                </tr>
                            </table>
                        </div>
                    </div>

                    <div class="text-center">
                        <button class='btn btn-primary' type="submit">发布商品</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!--右侧内容 结束-->
</div>
</body>
</html>